package com.lvchen.ui.fourfunction;

import android.content.Context;
import android.content.Intent;
import android.os.Bundle;
import android.view.View;

import com.lvchen.R;
import com.lvchen.common.base.AppManager;
import com.lvchen.common.base.BaseActivity;
import com.lvchen.common.utils.UIHelper;
import com.siberiadante.titlelayoutlib.TitleBarLayout;

/**
 * 例子页
 */
public class ExampleActivity extends BaseActivity{

    private TitleBarLayout tb_title;

    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_example);
        ensureUi();
    }

    private void ensureUi(){

        tb_title = (TitleBarLayout) findViewById(R.id.tb_title);
        tb_title.setIsHaveLine(false);
        tb_title.setLeftClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                AppManager.getAppManager().finishActivity();
            }
        });

        UIHelper.ShowLoadingView("调尼玛黄金比例最好喝");

    }

    public static void goToThisActivity(Context context) {
        Intent intent = new Intent();
        intent.setClass(context, ExampleActivity.class);
        context.startActivity(intent);
    }

}
